<!DOCTYPE html>
<html lang=zh>
<head>
    <meta charset="utf-8">
    
    <title>Java操作Cookie工具类 | IT浮云</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <meta name="description" content="在web开发中，很多时候我们都需要操作cookie，比如登录可以基于cookie来实现，又或者使用cookie来存取我们某些数据">
<meta name="keywords" content="-cookie">
<meta property="og:type" content="article">
<meta property="og:title" content="Java操作Cookie工具类">
<meta property="og:url" content="http://www.itfuyun.com/posts/java-cookie-utils.html">
<meta property="og:site_name" content="IT浮云">
<meta property="og:description" content="在web开发中，很多时候我们都需要操作cookie，比如登录可以基于cookie来实现，又或者使用cookie来存取我们某些数据">
<meta property="og:locale" content="zh-CN">
<meta property="og:updated_time" content="2017-09-27T15:06:20.824Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Java操作Cookie工具类">
<meta name="twitter:description" content="在web开发中，很多时候我们都需要操作cookie，比如登录可以基于cookie来实现，又或者使用cookie来存取我们某些数据">
    

    
        <link rel="alternate" href="/atom.xml" title="IT浮云" type="application/atom+xml" />
    

    
        <link rel="icon" href="/favicon.ico" />
    

    <link rel="stylesheet" href="/libs/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="/libs/open-sans/styles.css">
    <link rel="stylesheet" href="/libs/source-code-pro/styles.css">

    <link rel="stylesheet" href="/css/style.css">

    <script src="/libs/jquery/2.1.3/jquery.min.js"></script>
    
    
        <link rel="stylesheet" href="/libs/lightgallery/css/lightgallery.min.css">
    
    
        <link rel="stylesheet" href="/libs/justified-gallery/justifiedGallery.min.css">
    
    
    
    


</head>

<body>
    <div id="container">
        <header id="header">
    <div id="header-main" class="header-inner">
        <div class="outer">
            <a href="/" id="logo">
                <i class="logo"></i>
                <span class="site-title">IT浮云</span>
            </a>
            <nav id="main-nav">
                
                    <a class="main-nav-link" href="/.">首页</a>
                
                    <a class="main-nav-link" href="/archives">文章</a>
                
                    <a class="main-nav-link" href="/about">关于</a>
                
            </nav>
            
                
                <nav id="sub-nav">
                    <div class="profile" id="profile-nav">
                        <a id="profile-anchor" href="javascript:;">
                            <img class="avatar" src="/css/images/head.jpg" />
                            <i class="fa fa-caret-down"></i>
                        </a>
                    </div>
                </nav>
            
            <div id="search-form-wrap">

    <form class="search-form">
        <input type="text" class="ins-search-input search-form-input" placeholder="搜索" />
        <button type="submit" class="search-form-submit"></button>
    </form>
    <div class="ins-search">
    <div class="ins-search-mask"></div>
    <div class="ins-search-container">
        <div class="ins-input-wrapper">
            <input type="text" class="ins-search-input" placeholder="想要查找什么..." />
            <span class="ins-close ins-selectable"><i class="fa fa-times-circle"></i></span>
        </div>
        <div class="ins-section-wrapper">
            <div class="ins-section-container"></div>
        </div>
    </div>
</div>
<script>
(function (window) {
    var INSIGHT_CONFIG = {
        TRANSLATION: {
            POSTS: '文章',
            PAGES: '页面',
            CATEGORIES: '分类',
            TAGS: '标签',
            UNTITLED: '(未命名)',
        },
        ROOT_URL: '/',
        CONTENT_URL: '/content.json',
    };
    window.INSIGHT_CONFIG = INSIGHT_CONFIG;
})(window);
</script>
<script src="/js/insight.js"></script>

</div>
        </div>
    </div>
    <div id="main-nav-mobile" class="header-sub header-inner">
        <table class="menu outer">
            <tr>
                
                    <td><a class="main-nav-link" href="/.">首页</a></td>
                
                    <td><a class="main-nav-link" href="/archives">文章</a></td>
                
                    <td><a class="main-nav-link" href="/about">关于</a></td>
                
                <td>
                    
    <div class="search-form">
        <input type="text" class="ins-search-input search-form-input" placeholder="搜索" />
    </div>

                </td>
            </tr>
        </table>
    </div>
</header>

        <div class="outer">
            
                

<aside id="profile">
    <div class="inner profile-inner">
        <div class="base-info profile-block">
            <img id="avatar" src="/css/images/head.jpg" />
            <h2 id="name">IT浮云</h2>
            <h3 id="title">非典型程序员</h3>
            <span id="location"><i class="fa fa-map-marker"></i>深圳, 中国</span>
            <a id="follow" target="_blank" href="https://github.com/itfuyun/">关注我</a>
        </div>
        <div class="article-info profile-block">
            <div class="article-info-block">
                6
                <span>文章</span>
            </div>
            <div class="article-info-block">
                7
                <span>标签</span>
            </div>
        </div>
        
        <div class="profile-block social-links">
            <table>
                <tr>
                    
                    
                    <td>
                        <a href="http://github.com/itfuyun/" target="_blank" title="github" class=tooltip>
                            <i class="fa fa-github"></i>
                        </a>
                    </td>
                    
                    <td>
                        <a href="mailto:itfuyun@gmail.com" target="_blank" title="envelope" class=tooltip>
                            <i class="fa fa-envelope"></i>
                        </a>
                    </td>
                    
                    <td>
                        <a href="/" target="_blank" title="weibo" class=tooltip>
                            <i class="fa fa-weibo"></i>
                        </a>
                    </td>
                    
                    <td>
                        <a href="/atom.xml" target="_blank" title="rss" class=tooltip>
                            <i class="fa fa-rss"></i>
                        </a>
                    </td>
                    
                </tr>
            </table>
        </div>
        
    </div>
</aside>

            
            <section id="main"><article id="post-java-cookie-utils" class="article article-type-post" itemscope itemprop="blogPost">
    <div class="article-inner">
        
        
            <header class="article-header">
                
    
        <h1 class="article-title" itemprop="name">
            Java操作Cookie工具类
        </h1>
    

                
                    <div class="article-meta">
                        
    <div class="article-date">
        <i class="fa fa-calendar"></i>
        <a href="/posts/java-cookie-utils.html">
            <time datetime="2017-09-27T14:53:34.000Z" itemprop="datePublished">2017-09-27</time>
        </a>
    </div>


                        
    <div class="article-category">
    	<i class="fa fa-folder"></i>
        <a class="article-category-link" href="/categories/programming/">编程</a>
    </div>

                        
    <div class="article-tag">
        <i class="fa fa-tag"></i>
        <a class="tag-link" href="/tags/cookie/">-cookie</a>
    </div>

                    </div>
                
            </header>
        
        
        <div class="article-entry" itemprop="articleBody">
        
            
            <p>在web开发中，很多时候我们都需要操作cookie，比如登录可以基于cookie来实现，又或者使用cookie来存取我们某些数据<br><a id="more"></a></p>
<h2 id="代码"><a href="#代码" class="headerlink" title="代码"></a>代码</h2><figure class="highlight aspectj"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div><div class="line">52</div><div class="line">53</div><div class="line">54</div><div class="line">55</div><div class="line">56</div><div class="line">57</div><div class="line">58</div><div class="line">59</div><div class="line">60</div><div class="line">61</div><div class="line">62</div><div class="line">63</div><div class="line">64</div><div class="line">65</div><div class="line">66</div><div class="line">67</div><div class="line">68</div><div class="line">69</div><div class="line">70</div><div class="line">71</div><div class="line">72</div><div class="line">73</div><div class="line">74</div><div class="line">75</div><div class="line">76</div><div class="line">77</div><div class="line">78</div><div class="line">79</div><div class="line">80</div><div class="line">81</div><div class="line">82</div><div class="line">83</div><div class="line">84</div><div class="line">85</div><div class="line">86</div><div class="line">87</div><div class="line">88</div><div class="line">89</div><div class="line">90</div><div class="line">91</div><div class="line">92</div><div class="line">93</div><div class="line">94</div><div class="line">95</div><div class="line">96</div><div class="line">97</div><div class="line">98</div><div class="line">99</div><div class="line">100</div><div class="line">101</div><div class="line">102</div><div class="line">103</div><div class="line">104</div><div class="line">105</div><div class="line">106</div><div class="line">107</div><div class="line">108</div><div class="line">109</div><div class="line">110</div><div class="line">111</div><div class="line">112</div><div class="line">113</div><div class="line">114</div></pre></td><td class="code"><pre><div class="line">   <span class="comment">/**</span></div><div class="line"><span class="comment"> * 设置cookie有效期，根据需要自定义[本系统设置为30天]</span></div><div class="line"><span class="comment"> */</span></div><div class="line"><span class="keyword">private</span> <span class="keyword">final</span> <span class="keyword">static</span> <span class="keyword">int</span> COOKIE_MAX_AGE = <span class="number">1000</span> * <span class="number">60</span> * <span class="number">60</span> * <span class="number">24</span> * <span class="number">30</span>;</div><div class="line"></div><div class="line"><span class="comment">/**</span></div><div class="line"><span class="comment"> *</span></div><div class="line"><span class="comment"> * <span class="doctag">@desc</span> 删除指定Cookie</span></div><div class="line"><span class="comment"> * <span class="doctag">@param</span> response</span></div><div class="line"><span class="comment"> * <span class="doctag">@param</span> cookie</span></div><div class="line"><span class="comment"> */</span></div><div class="line"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> removeCookie(HttpServletResponse response, </div><div class="line">                                   Cookie cookie) &#123;</div><div class="line">	<span class="keyword">if</span> (cookie != <span class="keyword">null</span>) &#123;</div><div class="line">		cookie.setPath(<span class="string">"/"</span>);</div><div class="line">		cookie.setValue(<span class="string">""</span>);</div><div class="line">		cookie.setMaxAge(<span class="number">0</span>);</div><div class="line">		response.addCookie(cookie);</div><div class="line">	&#125;</div><div class="line">&#125;</div><div class="line"></div><div class="line"><span class="comment">/**</span></div><div class="line"><span class="comment"> *</span></div><div class="line"><span class="comment"> * <span class="doctag">@desc</span> 删除指定Cookie</span></div><div class="line"><span class="comment"> * <span class="doctag">@param</span> response</span></div><div class="line"><span class="comment"> * <span class="doctag">@param</span> cookie</span></div><div class="line"><span class="comment"> * <span class="doctag">@param</span> domain</span></div><div class="line"><span class="comment"> */</span></div><div class="line"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> removeCookie(HttpServletResponse response,</div><div class="line">                           Cookie cookie,String domain) &#123;</div><div class="line">	<span class="keyword">if</span> (cookie != <span class="keyword">null</span>) &#123;</div><div class="line">		cookie.setPath(<span class="string">"/"</span>);</div><div class="line">		cookie.setValue(<span class="string">""</span>);</div><div class="line">		cookie.setMaxAge(<span class="number">0</span>);</div><div class="line">		cookie.setDomain(domain);</div><div class="line">		response.addCookie(cookie);</div><div class="line">	&#125;</div><div class="line">&#125;</div><div class="line"></div><div class="line"><span class="comment">/**</span></div><div class="line"><span class="comment"> *</span></div><div class="line"><span class="comment"> * <span class="doctag">@desc</span> 根据Cookie名称得到Cookie的值，没有返回Null</span></div><div class="line"><span class="comment"> * <span class="doctag">@param</span> request</span></div><div class="line"><span class="comment"> * <span class="doctag">@param</span> name</span></div><div class="line"><span class="comment"> * <span class="doctag">@return</span></span></div><div class="line"><span class="comment"> */</span></div><div class="line"><span class="keyword">public</span> <span class="keyword">static</span> String getCookieValue(HttpServletRequest request, </div><div class="line">                                       String name) &#123;</div><div class="line">	Cookie cookie = getCookie(request, name);</div><div class="line">	<span class="keyword">if</span> (cookie != <span class="keyword">null</span>) &#123;</div><div class="line">		<span class="function"><span class="keyword">return</span> cookie.<span class="title">getValue</span><span class="params">()</span></span>;</div><div class="line">	&#125; <span class="keyword">else</span> &#123;</div><div class="line">		<span class="keyword">return</span> <span class="keyword">null</span>;</div><div class="line">	&#125;</div><div class="line">&#125;</div><div class="line"></div><div class="line"><span class="comment">/**</span></div><div class="line"><span class="comment"> *</span></div><div class="line"><span class="comment"> * <span class="doctag">@desc</span> 根据Cookie名称得到Cookie对象，不存在该对象则返回Null</span></div><div class="line"><span class="comment"> * <span class="doctag">@param</span> request</span></div><div class="line"><span class="comment"> * <span class="doctag">@param</span> name</span></div><div class="line"><span class="comment"> */</span></div><div class="line"><span class="keyword">public</span> <span class="keyword">static</span> Cookie getCookie(HttpServletRequest request,</div><div class="line">                                    String name) &#123;</div><div class="line">	Cookie cookies[] = request.getCookies();</div><div class="line">	<span class="keyword">if</span> (cookies == <span class="keyword">null</span> || name == <span class="keyword">null</span> || name.length() == <span class="number">0</span>)</div><div class="line">		<span class="keyword">return</span> <span class="keyword">null</span>;</div><div class="line">	Cookie cookie = <span class="keyword">null</span>;</div><div class="line">	<span class="keyword">for</span> (<span class="keyword">int</span> i = <span class="number">0</span>; i &lt; cookies.length; i++) &#123;</div><div class="line">		<span class="keyword">if</span> (!cookies[i].getName().equals(name))</div><div class="line">			<span class="keyword">continue</span>;</div><div class="line">		cookie = cookies[i];</div><div class="line">		<span class="keyword">if</span> (request.getServerName()</div><div class="line">		.equals(cookie.getDomain()))</div><div class="line">			<span class="keyword">break</span>;</div><div class="line">	&#125;</div><div class="line"></div><div class="line">	<span class="keyword">return</span> cookie;</div><div class="line">&#125;</div><div class="line"></div><div class="line"><span class="comment">/**</span></div><div class="line"><span class="comment"> *</span></div><div class="line"><span class="comment"> * <span class="doctag">@desc</span> 添加一条新的Cookie信息，默认有效时间为一个月</span></div><div class="line"><span class="comment"> * <span class="doctag">@param</span> response</span></div><div class="line"><span class="comment"> * <span class="doctag">@param</span> name</span></div><div class="line"><span class="comment"> * <span class="doctag">@param</span> value</span></div><div class="line"><span class="comment"> */</span></div><div class="line"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> setCookie(HttpServletResponse response,</div><div class="line">                                 String name, String value) &#123;</div><div class="line">	setCookie(response, name, value, COOKIE_MAX_AGE);</div><div class="line">&#125;</div><div class="line"></div><div class="line"><span class="comment">/**</span></div><div class="line"><span class="comment">    *</span></div><div class="line"><span class="comment">    * <span class="doctag">@desc</span> 添加一条新的Cookie信息，可以设置其最长有效时间(单位：秒)</span></div><div class="line"><span class="comment">    * <span class="doctag">@param</span> response</span></div><div class="line"><span class="comment">    * <span class="doctag">@param</span> name</span></div><div class="line"><span class="comment">    * <span class="doctag">@param</span> value</span></div><div class="line"><span class="comment">    * <span class="doctag">@param</span> maxAge</span></div><div class="line"><span class="comment">    */</span></div><div class="line">   <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> setCookie(HttpServletResponse response,</div><div class="line">                             String name, String value, <span class="keyword">int</span> maxAge)</div><div class="line">   &#123;</div><div class="line">           <span class="keyword">if</span> (value == <span class="keyword">null</span>)</div><div class="line">                   value = <span class="string">""</span>;</div><div class="line">           Cookie cookie = <span class="keyword">new</span> Cookie(name, value);</div><div class="line">           <span class="keyword">if</span>(maxAge!=<span class="number">0</span>)&#123;</div><div class="line">               cookie.setMaxAge(maxAge);</div><div class="line">           &#125;<span class="keyword">else</span>&#123;</div><div class="line">               cookie.setMaxAge(COOKIE_MAX_AGE);</div><div class="line">           &#125;</div><div class="line">           cookie.setPath(<span class="string">"/"</span>);</div><div class="line">           response.addCookie(cookie);</div><div class="line">   &#125;</div></pre></td></tr></table></figure>

        
        </div>
		
		
            
<div>
  <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
    <div style="margin-bottom:10px">请作者喝杯咖啡吧！</div>
    <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
      <span>赏</span>
    </button>
    <div id="QR" style="display: none;">
        <div id="wechat" style="display: inline-block">
          <a href="/css/images/wechatpay.png" class="fancybox fancybox.image" rel="group"><img id="wechat_qr" src="/css/images/wechatpay.png" alt="过眼浮云 WeChat Pay"></a>
          <p>微信打赏</p>
        </div>
        <div id="alipay" style="display: inline-block">
          <a href="/css/images/alipay.png" class="fancybox fancybox.image" rel="group"><img id="alipay_qr" src="/css/images/alipay.png" alt="过眼浮云 Alipay"></a>
          <p>支付宝打赏</p>
        </div>
    </div>
  </div>
</div>

        
		
		
            <! -- 添加版权信息 -->
<div class="article-footer-copyright">
<div>本站文章除注明转载外，均为本站原创或编译。欢迎任何形式的转载，但请务必注明出处。</div>
<div>转载请注明：文章转载自 IT浮云 <a href="/index.html" target="_blank" title="IT浮云">[http://www.itfuyun.com]</a></div>
<div>本文标题：Java操作Cookie工具类</div>
<div>本文地址：<a href="/posts/java-cookie-utils.html" target="_blank" title="Java操作Cookie工具类">http://www.itfuyun.com/posts/java-cookie-utils.html</a></div>
</div>
<! -- 添加版权信息 -->
        
		
        <footer class="article-footer">
            <div class="share-container">


    <div class="bdsharebuttonbox">
    <a href="#" class="bds_more" data-cmd="more">分享到：</a>
    <a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间">QQ空间</a>
    <a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博">新浪微博</a>
    <a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博">腾讯微博</a>
    <a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网">人人网</a>
    <a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信">微信</a>
</div>
<script>
window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{"bdSize":16}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
</script>
<style>
    .bdshare_popup_box {
        border-radius: 4px;
        border: #e1e1e1 solid 1px;
    }
    .bdshare-button-style0-16 a,
    .bdshare-button-style0-16 .bds_more {
        padding-left: 20px;
        margin: 6px 10px 6px 0;
    }
    .bdshare_dialog_list a,
    .bdshare_popup_list a,
    .bdshare_popup_bottom a {
        font-family: 'Microsoft Yahei';
    }
    .bdshare_popup_top {
        display: none;
    }
    .bdshare_popup_bottom {
        height: auto;
        padding: 5px;
    }
</style>


</div>

            
    
        <a href="http://www.itfuyun.com/posts/java-cookie-utils.html#comments" id="sourceId::posts/java-cookie-utils.html" class="article-comment-link cy_cmt_count">评论</a>
    

        </footer>
    </div>
    
        
<nav id="article-nav">
    
        <a href="/posts/hashmap-source-code-analysis.html" id="article-nav-newer" class="article-nav-link-wrap">
            <strong class="article-nav-caption">上一篇</strong>
            <div class="article-nav-title">
                
                    HashMap 源码分析
                
            </div>
        </a>
    
    
        <a href="/posts/rapid-generator.html" id="article-nav-older" class="article-nav-link-wrap">
            <strong class="article-nav-caption">下一篇</strong>
            <div class="article-nav-title">告别枯燥的CRUD，Java代码生成器的使用</div>
        </a>
    
</nav>


    
</article>


    
    
        <section id="comments">
    <div id="SOHUCS" sid="posts/java-cookie-utils.html"></div>
</section>
    

</section>
            
                
<aside id="sidebar">
   
        
    <div class="widget-wrap">
        <h3 class="widget-title">最新文章</h3>
        <div class="widget">
            <ul id="recent-post" class="no-thumbnail">
                
                    <li>
                        
                        <div class="item-inner">
                            <p class="item-category"><a class="article-category-link" href="/categories/design-pattern/">设计模式</a></p>
                            <p class="item-title"><a href="/posts/design-pattern-lsp.html" class="title">设计模式之-里氏替换原则LSP</a></p>
                            <p class="item-date"><time datetime="2017-10-20T05:50:53.000Z" itemprop="datePublished">2017-10-20</time></p>
                        </div>
                    </li>
                
                    <li>
                        
                        <div class="item-inner">
                            <p class="item-category"><a class="article-category-link" href="/categories/programming/">编程</a></p>
                            <p class="item-title"><a href="/posts/freemarker-generates-static-files.html" class="title">Freemarker生成静态文件</a></p>
                            <p class="item-date"><time datetime="2017-10-16T07:58:51.000Z" itemprop="datePublished">2017-10-16</time></p>
                        </div>
                    </li>
                
                    <li>
                        
                        <div class="item-inner">
                            <p class="item-category"><a class="article-category-link" href="/categories/source-code-analysis/">源码分析</a></p>
                            <p class="item-title"><a href="/posts/hashmap-source-code-analysis.html" class="title">HashMap 源码分析</a></p>
                            <p class="item-date"><time datetime="2017-10-14T06:31:55.000Z" itemprop="datePublished">2017-10-14</time></p>
                        </div>
                    </li>
                
                    <li>
                        
                        <div class="item-inner">
                            <p class="item-category"><a class="article-category-link" href="/categories/programming/">编程</a></p>
                            <p class="item-title"><a href="/posts/java-cookie-utils.html" class="title">Java操作Cookie工具类</a></p>
                            <p class="item-date"><time datetime="2017-09-27T14:53:34.000Z" itemprop="datePublished">2017-09-27</time></p>
                        </div>
                    </li>
                
                    <li>
                        
                        <div class="item-inner">
                            <p class="item-category"><a class="article-category-link" href="/categories/programming/">编程</a></p>
                            <p class="item-title"><a href="/posts/rapid-generator.html" class="title">告别枯燥的CRUD，Java代码生成器的使用</a></p>
                            <p class="item-date"><time datetime="2017-09-26T12:49:39.000Z" itemprop="datePublished">2017-09-26</time></p>
                        </div>
                    </li>
                
            </ul>
        </div>
    </div>

    
        
    <div class="widget-wrap">
        <h3 class="widget-title">分类</h3>
        <div class="widget">
            <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/other/">其他</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/source-code-analysis/">源码分析</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/programming/">编程</a><span class="category-list-count">3</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/design-pattern/">设计模式</a><span class="category-list-count">1</span></li></ul>
        </div>
    </div>

    
        
    <div class="widget-wrap">
        <h3 class="widget-title">归档</h3>
        <div class="widget">
            <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/10/">十月 2017</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/09/">九月 2017</a><span class="archive-list-count">3</span></li></ul>
        </div>
    </div>

    
        
    <div class="widget-wrap">
        <h3 class="widget-title">标签云</h3>
        <div class="widget tagcloud">
            <a href="/tags/cookie/" style="font-size: 10px;">-cookie</a> <a href="/tags/hexo/" style="font-size: 10px;">-hexo</a> <a href="/tags/代码生成/" style="font-size: 10px;">-代码生成</a> <a href="/tags/HashMap/" style="font-size: 10px;">HashMap</a> <a href="/tags/freemarker/" style="font-size: 10px;">freemarker</a> <a href="/tags/lsp/" style="font-size: 10px;">lsp</a> <a href="/tags/里氏替换/" style="font-size: 10px;">里氏替换</a>
        </div>
    </div>

    
    <div id="toTop" class="fa fa-angle-up"></div>
</aside>

            
        </div>
        <footer id="footer">
    <div class="outer">
        <div id="footer-info" class="inner">
            &copy; 2018 IT浮云<br>
            Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>. Theme by <a href="http://github.com/ppoffice">PPOffice</a>
        </div>
    </div>
</footer>
        
    
    <script id="cy_cmt_num" src="https://changyan.sohu.com/upload/plugins/plugins.list.count.js?clientId=cytezlr4l"></script>
    <script charset="utf-8" type="text/javascript" src="https://changyan.sohu.com/upload/changyan.js" ></script>
    <script type="text/javascript">
    window.changyan.api.config({
    appid: 'cytezlr4l',
    conf: '7625b051042273ad10802550abd3d130'
    });
    </script>




    
        <script src="/libs/lightgallery/js/lightgallery.min.js"></script>
        <script src="/libs/lightgallery/js/lg-thumbnail.min.js"></script>
        <script src="/libs/lightgallery/js/lg-pager.min.js"></script>
        <script src="/libs/lightgallery/js/lg-autoplay.min.js"></script>
        <script src="/libs/lightgallery/js/lg-fullscreen.min.js"></script>
        <script src="/libs/lightgallery/js/lg-zoom.min.js"></script>
        <script src="/libs/lightgallery/js/lg-hash.min.js"></script>
        <script src="/libs/lightgallery/js/lg-share.min.js"></script>
        <script src="/libs/lightgallery/js/lg-video.min.js"></script>
    
    
        <script src="/libs/justified-gallery/jquery.justifiedGallery.min.js"></script>
    
    



<!-- Custom Scripts -->
<script src="/js/main.js"></script>

    </div>
</body>
</html>